<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0"
    />
    <style type="text/css">
      html,
      body {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        margin: 0;
        padding: 0;
      }
      button {
        display: block;
        width: 100%;
        padding: 20px;
        font-size: 30px;
      }
    </style>
  </head>
  <body>
    <script src="./jsbridge.js"></script>
    <script type="text/javascript">
      function onClickButton(button) {
        switch (button.innerText) {
          case "Navigation.open":
            JSBridge.Navigation.open({
                page: 'page_2.html'
            })
            break
          case "Navigation.close":
            JSBridge.Navigation.close()
            break
          case "Navigation.push":
            JSBridge.Navigation.push({
              page: 'page_1.html'
            })
            break
        }
      }
    </script>
    <h1>page_1.html</h1>
    <button onclick="onClickButton(this)">Navigation.open</button>
    <button onclick="onClickButton(this)">Navigation.close</button>
    <button onclick="onClickButton(this)">Navigation.push</button>
  </body>
  </body>
</html>
